<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-machine-edit" th:object="${machine}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">设备名称：</label>
                <div class="col-sm-8">
                    <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">设备imei：</label>
                <div class="col-sm-8">
                    <input id="code" name="code" th:field="*{code}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">昵称：</label>
                <div class="col-sm-8">
                    <input id="nickName" name="nickName" th:field="*{nickName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">性别：</label>
                <div class="col-sm-8">
                    <select id="sex" name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
	                </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">出生日期：</label>
                <div class="col-sm-8">
                    <input id="birthday" name="birthday" th:value="${#dates.format(machine.birthday, 'yyyy-MM-dd')}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">血压值：</label>
                <div class="col-sm-8">
                    <input id="bloodVal" name="bloodVal" th:field="*{bloodVal}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">目标步数：</label>
                <div class="col-sm-8">
                    <input id="stepGoal" name="stepGoal" th:field="*{stepGoal}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">睡眠指标（分钟）：</label>
                <div class="col-sm-8">
                    <input id="sleepGoal" name="sleepGoal" th:field="*{sleepGoal}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">身高（CM）：</label>
                <div class="col-sm-8">
                    <input id="height" name="height" th:field="*{height}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">体重（KG）：</label>
                <div class="col-sm-8">
                    <input id="weight" name="weight" th:field="*{weight}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">血型：</label>
                <div class="col-sm-8">
                    <input id="bloodType" name="bloodType" th:field="*{bloodType}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">病史：</label>
                <div class="col-sm-8">
                    <!-- <input id="medicalHistory" name="medicalHistory" th:field="*{medicalHistory}" class="form-control" type="text"> -->
                    <textarea type="text" id="medicalHistory" name="medicalHistory" th:field="*{medicalHistory}" class="form-control"></textarea>
                </div>
            </div>
            <!-- <div class="form-group">	
                <label class="col-sm-3 control-label">设备来源：</label>
                <div class="col-sm-8">
                    <input id="source" name="source" th:field="*{source}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">关联用户：</label>
                <div class="col-sm-8">
                    <input id="userId" name="userId" th:field="*{userId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">创建者：</label>
                <div class="col-sm-8">
                    <input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">更新者：</label>
                <div class="col-sm-8">
                    <input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">更新时间：</label>
                <div class="col-sm-8">
                    <input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
                </div>
            </div> -->
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "machine"
		$("#form-machine-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-machine-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
